package com.harry.threaddemo;

/**
 * @author Harry
 * @date 2018/3/22 10:49
 */
public class MyThreadInfo extends Thread {

	@Override
	public void run() {
		System.out.println("MyThreadInfo 的线程实例正在执行任务");
	}

	public static void main(String[] args) {
		MyThreadInfo thread = new MyThreadInfo();

		System.out.println("MyThreadInfo 的线程对象 \n" + "线程唯一标识符：" + thread.getId() + "\n" + "线程名称：" + thread.getName() + "\n"
				+ "线程状态：" + thread.getState() + "\n" + "线程优先级：" + thread.getPriority());

		System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
		thread.start();

		System.out.println("MyThreadInfo 的线程对象 \n" + "线程唯一标识符：" + thread.getId() + "\n" + "线程名称：" + thread.getName() + "\n"
				+ "线程状态：" + thread.getState() + "\n" + "线程优先级：" + thread.getPriority());
	}
}
